class Solution {
public:
    ListNode* deleteDuplicates(ListNode* tou)
     {
        if (!tou)  return tou;
        ListNode* c = tou;
        while (c->next) {
            if (c->val == c->next->val)
             {
                c->next = c->next->next;
            }
            else 
            {
                c = c->next;
            }
        }
        return tou;
    }
};

